package com.ybox.crawler.api.service;

import com.ybox.common.core.constant.ServiceNameConstants;
import com.ybox.common.core.domain.R;
import com.ybox.crawler.api.factory.RemoteCrawlerFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;


/**
 * 文件服务
 * 
 * @author ych
 */
@FeignClient(contextId = "remoteAppCollectArticleService", value = ServiceNameConstants.CRAWLER_SERVICE, fallbackFactory = RemoteCrawlerFallbackFactory.class)
public interface RemoteCrawlerService
{
    /**
     * 更具url爬取文章
     *
     * @param url url地址
     * @return 结果
     */
    @GetMapping(value = "/crawler")
    public R<String> getArticleFromUrl(@RequestParam String url);
}
